package org.dfg.corejava.designPattern.component;

public class TestComponent {
	public static void main(String[] args) {
		Component root = new Composite("中国");
		Component sd = new Composite("山东");
		Component hb = new Composite("河北");

		Component sjz = new Composite("石家庄");
		Component jn = new Composite("济南");
		
		sd.add(jn);
		hb.add(sjz);
		
		root.add(sd);
		root.add(hb);
		root.add(new Leaf("天津"));
		root.add(new Leaf("上海"));

		root.show(0);
	}
}
